<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    
    <title></title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>ext-3.2.1/resources/css/ext-all.css"/>
	<script type="text/javascript" src="<%=basePath%>ext-3.2.1/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="<%=basePath%>ext-3.2.1/ext-all.js"></script>
	<script type="text/javascript" src="<%=basePath%>ext-3.2.1/ux/PageComboResizer.js"></script>
	<script type="text/javascript" src="<%=basePath%>ext-3.2.1/ext-lang-zh_CN.js"></script>
		
	<script type="text/javascript" src="<%=basePath%>scripts/jquery-1.4.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>scripts/apputil.js"></script>
	<script type="text/javascript" src="<%=basePath%>pages/question/question.js"></script>
	<link rel="stylesheet" href="../scripts/kindeditor-4.1/plugins/code/prettify.css" />
	<script charset="utf-8" src="../scripts/kindeditor-4.1/kindeditor-min.js"></script>
	<script charset="utf-8" src="../scripts/kindeditor-4.1/lang/zh_CN.js"></script>
	<script charset="utf-8" src="../scripts/kindeditor-4.1/plugins/code/prettify.js"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
	  <style type="text/css">
	    body{
	    font-size: 12px;
	  }
	  	.td{
			height: 30px;
		}
		.tdB {
			border-bottom:1px solid #0190FB;
			height: 25px;
		}
		
		.tdL {
			border-left:1px solid #0190FB;
			height: 25px;
		}
		
		.tdR {
			border-right:1px solid #0190FB;
			height: 25px;
		}
		
		.tdT {
			border-top:1px solid #0190FB;
			height:25px;
		}
	</style>
	<script type="text/javascript">
		function checkForm(value){
	     if(trim($("#hasReply").val()).length==0){
		     alert("回复不能为空");
		     return false;
	     }
	     document.forms[0].action="question/replyQuestion.action?tiQuestion.isReply=1&ifsendEmail="+value;
	     document.forms[0].submit();
		}
	  function leterForm(){
	    if(trim($("#hasReply").val()).length==0){
		    alert("回复不能为空");
		    return false;
	    }
	    alert("回复内容暂且保存，请稍后继续完善！");
	    document.forms[0].action="question/replyQuestion.action?tiQuestion.isReply=3";
	    document.forms[0].submit();
	 }
	</script>
	<body>
	<form action="<%=basePath%>question/replyQuestion.action" method="post" id="myform" name="myform" enctype="multipart/form-data"> 
	<div align="center">
	<table width="80%" border="0" cellspacing="1" cellpadding="5" class="tabCls" style="margin-top: 10px;">
		<tr>
			<td colspan="4" align="center" bgcolor="#ffffff">
				<span style="font-size: 25px; font: ; font-weight: bold;">求诊信息回复</span>
			</td>
		</tr>
	</table>
		<table width="85%" border="0" style="margin-top: 10px;" cellpadding="0" cellspacing="0">
			
			<tr>
				<td align="right" class="tdT tdR tdL" width="20%">标题：</td>
				<td colspan="4" class="tdT tdR" width="100%" align="left">
				&nbsp;&nbsp;<s:property value="tiQuestion.title"/></td>
			</tr>
			<tr>
				<td align="right" class="tdT tdR tdL" width="20%">求诊时间：</td>
				<td colspan="4" class="tdT tdR" width="100%" align="left">
				&nbsp;&nbsp;<s:date name="tiQuestion.createTime" format="yyyy-MM-dd HH:mm:ss"/></td>
			</tr>
			<tr>
				<td align="right" class="tdT tdR tdL" width="20%">求诊人：</td>
				<td colspan="4" class="tdT tdR" width="100%" align="left">
				&nbsp;&nbsp;<s:property value="tiQuestion.createMan"/></td>
			</tr>
			<tr>
				<td align="right" class="tdR tdL tdB tdT">求诊内容：</td>
				<td class="tdR tdB tdT" colspan="4" align="left">
			&nbsp;&nbsp;<s:property value="tiQuestion.content" escape="false"/>
				</td>
			</tr>
			<tr>
				<td align="right" class="tdR tdL tdB ">回复内容：</td>
				<td class="tdR tdB " colspan="4">
				&nbsp;<textarea style="width:770px;height:200px;word-wrap:break-word;" name="tiQuestion.hasReply" id="hasReply"><s:property value="tiQuestion.hasReply" /></textarea>
				</td>
			</tr>
			<s:if test="tiQuestion.isReply==2"></s:if>
			<tr>
				<td align="right" class="tdR tdL tdB ">回复时间：</td>
				<td class="tdR tdB " colspan="4" align="left">
				&nbsp;&nbsp;<s:date name="tiQuestion.replyTime" format="yyyy-MM-dd HH:mm:ss"/>
				</td>
			</tr>
		</table>
		
		
		<input type="hidden" id="id" name="tiQuestion.id" value="<s:property value="tiQuestion.id"/>"/>
		<table width="80%" class="tabCls">
		<tr>
			<td align="center">
				<input type="button" id="save" name="Submit" value="暂时保存" 
					onClick="leterForm()" class="button_sty saveBtn" />
				<input type="button" id="save" name="Submit" value="直接回复"
					onClick="checkForm('1')" class="button_sty saveBtn" />
				<input type="button" id="save" name="Submit" value="回复并发送邮件"
					onClick="checkForm('2')" class="button_sty saveBtn" />
				<input type="button" id="reset" name="reset" value="返 回"
						onClick="goBackReset()" class="button_sty backBtn" />
			</td>
		</tr>
	</table>
	</div>
	</form>
	</body>
	
</html>
